<!-- 领取成功页面 -->
<template>
	<view class="receivesuccess">
		<view class="img-box">
			<image src="../../../static/images/linquchenggogn.png" mode="aspectFit"></image>
			<text>有效期：{{start_time}}-{{end_time}}</text>
			<view @click="getReceivecoupons">查看我的优惠券</view>
		</view>
		<button type="default" @click="getReceivecoupons">去使用</button>
	</view>
</template>

<script>
	import {shareMixins} from '../../../mixins/share.js'
	export default {
		mixins:[shareMixins],
		data() {
			return {
				shareData: {
				    title: '空港卡券联盟商户端',
				    path: '/pages/mine/mine' // 分享的页面路径
				},
				lqkqDetails:'',
				start_time:'',
				end_time:''
			}
		},
		onLoad() {
			this.lqkqDetails = uni.getStorageSync('lqkqDetails')
			let start_time = this.lqkqDetails.start_time
			let end_time = this.lqkqDetails.end_time
			this.start_time = (new Date(parseInt(start_time) * 1000).toLocaleString().substr(0,9))
			this.end_time = (new Date(parseInt(end_time) * 1000).toLocaleString().substr(0,9)) 
			  
		},
		methods: {
			getReceivecoupons(){//跳转领取优惠券和页面
				uni.navigateTo({
					url:'../receivecoupons/receivecoupons'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.receivesuccess{
		background-color: #FFFFFF;
		position: absolute;
		height: 100%;
		width: 100%;
		.img-box{
			position: relative;
			image{
				width: 100%;
				height: 388rpx;
				margin-bottom: 62rpx;
			}
			text{
				position: absolute;
				top: 50%;
				left: 50%;
				margin-top: -2%;
				margin-left: -25%;
				font-size: 28rpx;
				color: #FFFFFF;
			}
			view{
				position: absolute;
				top: 50%;
				left: 50%;
				margin-top: 10%;
				margin-left: -14%;
				font-size: 30rpx;
				color: #FFFFFF;
				padding-bottom: 10rpx;
				border-bottom: 1rpx solid #FFFFFF;
			}
		}
		
		button{
			width: 90%;
			margin: auto;
			background: linear-gradient(#FFEED9,#FFE7CB,#FFDDB9);
			border-radius: 100rpx;
			color: #731400;
			font-size: 36rpx;
			padding: 0;
			display: flex;
			align-items: center;
			justify-content: center;
			font-weight: bold;
		}
	}
</style>
